﻿<UserControl x:Class="Majoopic.WPFClient.Views.UCEngineManager"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignHeight="330" d:DesignWidth="460" MinWidth="300" MinHeight="170">    
    <Grid Height="Auto" Width="Auto">        
        <TextBox ToolTip="Click to choose a folder" Text="{Binding RootFolderText}"  Height="23" HorizontalAlignment="Stretch" Margin="70,12,93,0" Name="tbRootFolder" VerticalAlignment="Top" GotFocus="tbRootFolder_GotFocus" IsReadOnly="True" />
        <Button Content="Scan" Visibility="{Binding Path=IsScanButtonVisible, Converter={StaticResource convBoolVisibility}, Mode=OneWay}" Height="23" HorizontalAlignment="Right" Margin="0,12,12,0" Name="btScan" VerticalAlignment="Top" Width="75" Command="{Binding StartJobCommand}" />
        <Button Content="Cancel" Visibility="{Binding ElementName=btScan, Path=Visibility, Converter={StaticResource convInverseVisibility}, Mode=OneWay}" Height="23" HorizontalAlignment="Right" Margin="0,12,12,0" Name="btCancel" VerticalAlignment="Top" Width="75" Command="{Binding CancelJobCommand}" />
        <ListBox ItemsSource="{Binding Path=Messages, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" Margin="12,205,12,12" Name="lbMessages" VerticalAlignment="Stretch" Width="Auto">
        </ListBox>
        <Grid DataContext="{Binding Path=ProgressInformation, UpdateSourceTrigger=Explicit,Mode=OneWay}"  Name="gridProgress" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,69,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Label Content="Scan directories job : " Height="28" HorizontalAlignment="Left" Margin="12,0,0,0" Name="lblScanDirectoryJob" VerticalAlignment="Top" />
            <ProgressBar Height="10" HorizontalAlignment="Stretch" Grid.Column="0" Margin="12,21,0,0" Name="pBarScanDirectory" VerticalAlignment="Top" Width="Auto" IsIndeterminate="{Binding IsScanDirectory,UpdateSourceTrigger=PropertyChanged}" />
            <ProgressBar Height="10" HorizontalAlignment="Stretch" Grid.Column="0" Maximum="{Binding Path=TotalImagesFound}" Value="{Binding Path=NumberImagesScaned}"  Margin="12,61,0,0" Name="pBarScanImage" VerticalAlignment="Top" Width="Auto" />
            <ProgressBar Height="10" HorizontalAlignment="Stretch" Grid.Column="0" Maximum="{Binding Path=TotalImagesToSave}" Value="{Binding Path=NumberImagesSaved}" Margin="12,101,0,0" Name="pBarSaveImage" VerticalAlignment="Top" Width="Auto" />
            <TextBlock Height="Auto" Grid.Column="1" HorizontalAlignment="Left" Margin="11,5,0,0" Name="lblImagesFound" VerticalAlignment="Top" Width="Auto">
                <Run Text="Total Images : " />
                <Run Text="{Binding Path=TotalImagesFound,UpdateSourceTrigger=PropertyChanged}" />
            </TextBlock>
            <TextBlock Height="Auto" Grid.Column="1" HorizontalAlignment="Left" Margin="10,21,0,0" Name="lblTotalDirectory" VerticalAlignment="Top" Width="Auto">
                <Run Text="Total Directory Scan : " />
                <Run Text="{Binding Path=TotalDirectoryScan,UpdateSourceTrigger=PropertyChanged}" />
            </TextBlock>
            <TextBlock Height="Auto" Grid.Column="1"  HorizontalAlignment="Left" Margin="12,52,0,0" Name="lblImagesScan" VerticalAlignment="Top">
                <Run Text="{Binding Path=NumberImagesScaned,UpdateSourceTrigger=PropertyChanged}" />
                <Run Text="/" />
                <Run Text="{Binding Path=TotalImagesFound,UpdateSourceTrigger=PropertyChanged}" />
            </TextBlock>
            <Label Content="{Binding Path=NumberImagesScanFailed}" Foreground="Red" Grid.Column="2" Height="Auto" HorizontalAlignment="Left" Margin="12,52,12,0" Name="lblImagesScanFailed" VerticalAlignment="Top" Width="Auto" />
            <TextBlock Height="Auto" Grid.Column="1" HorizontalAlignment="Left" Margin="12,92,0,0" Name="lblImagesSaved" VerticalAlignment="Top">
                <Run Text="{Binding Path=NumberImagesSaved,UpdateSourceTrigger=PropertyChanged}" />
                <Run Text="/" />
                <Run Text="{Binding Path=TotalImagesToSave,UpdateSourceTrigger=PropertyChanged}" />
            </TextBlock>
            <Label Content="{Binding Path=NumberImagesSaveFailed}" Foreground="Red" Grid.Column="2" Height="Auto" HorizontalAlignment="Left" Margin="12,92,12,0" Name="lblImagesSaveFailed" VerticalAlignment="Top" />
            <Label Content="Scan images job : " Height="28" HorizontalAlignment="Left" Margin="12,34,0,0" Name="lblScanImagesJob" VerticalAlignment="Top" />
            <Label Content="Save images job : " Height="28" HorizontalAlignment="Left" Margin="12,74,0,0" Name="lblSaveImagesJob" VerticalAlignment="Top" />
        </Grid>
        
        <CheckBox Content="With Message" Height="16" Width="Auto" HorizontalAlignment="Left" Margin="12,47,0,0" Name="cbWithMessage" VerticalAlignment="Top" IsChecked="{Binding WithMessages}" />
        <CheckBox Content="With Counter" Height="16" Width="Auto" HorizontalAlignment="Left" Margin="120,47,0,0" Name="cbWithCounter" VerticalAlignment="Top" IsChecked="{Binding WithCounters}" />
        <Label Content="{Binding Path=ScanDirectoryTime,UpdateSourceTrigger=PropertyChanged}" Height="28" HorizontalAlignment="Left" Width="Auto" Margin="220,42,0,0" Name="lblTimeScanDirectory" VerticalAlignment="Top" />
        <Label Content="Folder : " Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="label1" VerticalAlignment="Top" />
    </Grid>
</UserControl>
